package com.meusconcursos.dataupdate.tables;

import android.content.ContentValues;
import android.util.Log;

import com.meusconcursos.MeusConcursosActivity;
import com.meusconcursos.dataupdate.Record;
import com.meusconcursos.dataupdate.Table;

public class TableNivelCargo extends Table {

	public TableNivelCargo() {
		super();

	}

	@Override
	public String getTableName() {
		return "nivel_cargo";
	}

	@Override
	public String getScriptTableCreate() {
		return getHeaderScriptTableCreate()
				+ "([_id] INTEGER NOT NULL PRIMARY KEY, "
				+ " [nome] TEXT NOT NULL)";
	}

	@Override
	public Record newRecordInstance(String[] values) {

		ContentValues cv = null;

		cv = new ContentValues();
		int indiceValue = 0;

		cv.put("_id", new Integer(values[indiceValue++]));
		cv.put("nome", values[indiceValue++]);
		
		Log.i(MeusConcursosActivity.DEBUG_TAG, "Criando Registro NIVEL_CARGO: " + cv.toString());

		return new Record(cv);

	}

}
